<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>改变文字，样式，更换图片</title>
</head>
<body>
<h1 style="color: red">改变文字：</h1>
<h1 id="header1">old header</h1>
<button type="button" onclick="myaa()">更换文字</button><br>
<h1 style="color: red">改变图片：</h1>
<img id="image" src="lv.jpg"><br>
<button type="button" onclick="bbb()">更换图片</button><br>
<h1 style="color: red">改变HTML元素的样式：</h1>
<p id="p1">你好鸭，初次见面，请多多关照思密达！</p>
<button type="button" onclick="ccc()">更换样式</button><br>
<script>
    function myaa() {
        var e=document.getElementById("header1");
        e.innerHTML="yeah!!!!"
    }

    function bbb(){
        var a=document.getElementById("image");
        a.src="xixi.jpg";
    }
    function ccc() {
        var c=document.getElementById("p1");
        c.style.color="blue";
    }
</script>
</body>
</html>